package org.example.myleet.p398;

import org.example.myleet.Utils.Assert;

import java.util.HashMap;
import java.util.Map;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution(new int[]{1,2,3,3,3});
        Assert.isTrue(0 == solution.pick(1));
        Map<Integer, Integer> numberAppearance = new HashMap<>();
        for (int i = 0; i < 10000; ++i) {
            int pick = solution.pick(3);
            int count = numberAppearance.getOrDefault(pick, 0);
            ++count;
            numberAppearance.put(pick, count);
        }
        System.out.println(numberAppearance);
    }
}
